package com.uzhie.web.bean;

import org.apache.ibatis.session.RowBounds;

import java.io.Serializable;

/**
 * Created by Coder on 2018/7/13.
 */
public class PageBean implements Serializable {

    private int index;
    private int size;
    private long countSize;
    private int countPage;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index <= 0 ? 1 : index;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size < 10 ? 10 : size;
    }

    public long getCountSize() {
        return countSize;
    }

    public void setCountSize(long countSize) {
        this.countSize = countSize;
    }

    public int getCountPage() {
        return countPage;
    }

    public void setCountPage(int countPage) {
        this.countPage = countPage;
    }

    public RowBounds getRowBounds() {
        return new RowBounds(index, size);
    }
}
